﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AssetManagementSystem.Model.IDao {
    public interface IGroupDAO {
        /// <summary>
        /// Create a new group in the database, from a 'Group' business object.
        /// </summary>
        /// <param name="group">The group object to be stored in the database</param>
        void CreateGroup(Group group);
        /// <summary>
        /// Retrieve a single group from the database, using its ID as the PKey.
        /// </summary>
        /// <param name="id">The Id of the group to be retrieved</param>
        /// <returns>The 'Group' business object for the requested group.</returns>
        Group GetGroup(string name);
        /// <summary>
        /// Returns a collection of all groups found within the database.
        /// </summary>
        /// <returns>A collection of all groups found within the database.</returns>
        ICollection<Group> GetAllGroups();
        /// <summary>
        /// Update the details of an group already stored within the database.
        /// </summary>
        /// <param name="group">The new details of the group to update. ID must remain the same as it is the PKey.</param>
        void UpdateGroup(Group group);
        /// <summary>
        /// Delete data for a single group from the database.
        /// </summary>
        /// <param name="id">The group id of the group to be deleted.</param>
        void DeleteGroup(Group group);
        /// <summary>
        /// Deletes a property of the specified group
        /// </summary>
        /// <param name="groupName">The group whos property is being deleted</param>
        /// <param name="name">The name of the property to delete</param>
        void DeleteGroupProperty(string groupName, string name);
    }
}
